using System;
using System.Collections.Generic;
using System.Text;
using System.Data.OleDb;
using System.Data;
namespace XProject.DAO
{
    class ADODataAccess:DBAccess
    {
        public DataTable GetAll()
        {
            
            OleDbCommand command = new OleDbCommand("select StartTime, EndTime, Content, Place from Events",conn);
            OleDbDataAdapter ado=new OleDbDataAdapter(command);
            DataTable tbl = new DataTable("events");
            try
            {
                if (Connect())
                {
                    ado.Fill(tbl);
                    Disconnect();
                }
            }
            catch (OleDbException ex) { }
            return tbl;

        }

    }
}
